#ifndef __CONDITION_H__
#define __CONDITION_H__

#include "NoCopy.hpp"

#include <pthread.h>

namespace cdm{

class MutexLock;

class Condition: public NoCopy{

public:
    Condition(MutexLock&);
    ~Condition();
    
    void wait();
    void notifyOne();
    void notifyAll();

private:
    pthread_cond_t _cond;    
    MutexLock&     _mutex;
};



}//end of namespace 

#endif


